package com.bestcem.xm.txtanls.service.dto.survey;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 问卷项目开放选项DTO
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021/5/8
 */
@ApiModel("开放选项")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class OpenQuestionDTO {
    /**
     * 题目标题
     */
    @ApiModelProperty(value = "开放文本答案col", required = true)
    @JsonProperty(value = "title")
    private String title;

    /**
     * 当前题目答案列表
     */
    @ApiModelProperty(value = "当前题目答案列表", required = true)
    @JsonProperty(value = "options")
    private List<OpenOptionDTO> openOptionDTOList;

    @ApiModel("开放选项对应的开放文本")
    @NoArgsConstructor
    @AllArgsConstructor
    @Data
    public static class OpenOptionDTO implements Serializable {
        private static final long serialVersionUID = 2808726620840986656L;

        /**
         * 开放文本答案col
         */
        @ApiModelProperty(value = "开放文本答案col", required = true)
        @JsonProperty(value = "id")
        private String id;

        /**
         * 开放文本内容
         */
        @ApiModelProperty(value = "开放文本内容", required = true)
        @JsonProperty(value = "title")
        private String title;
    }
}
